package com.shangguan.springboot.service.impl;

import com.shangguan.springboot.dao.TPermissionsMapper;
import com.shangguan.springboot.entity.TPermissions;
import com.shangguan.springboot.service.TPermissionsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TPermissionsServiceImpl implements TPermissionsService{

    @Resource
    private TPermissionsMapper tPermissionsMapper;

    @Override
    public int deleteByPrimaryKey(Integer permissionsId) {
        return tPermissionsMapper.deleteByPrimaryKey(permissionsId);
    }

    @Override
    public int insert(TPermissions record) {
        return tPermissionsMapper.insert(record);
    }

    @Override
    public int insertSelective(TPermissions record) {
        return tPermissionsMapper.insertSelective(record);
    }

    @Override
    public TPermissions selectByPrimaryKey(Integer permissionsId) {
        return tPermissionsMapper.selectByPrimaryKey(permissionsId);
    }

    @Override
    public int updateByPrimaryKeySelective(TPermissions record) {
        return tPermissionsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TPermissions record) {
        return tPermissionsMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<TPermissions> findTpermissionsByRoleId(int roleId) {
        return tPermissionsMapper.findTpermissionsByRoleId(roleId);
    }

}
